package mysql

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Account  string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:char(32)"`
	Name     string `gorm:"type:varchar(50)"`
	Image    string `gorm:"type:varchar(500)"`
}

type House struct {
	gorm.Model
	Title  string  `gorm:"type:varchar(50);not null"`
	Price  float64 `gorm:"type:decimal(10,2);not null"`
	Stock  string  `gorm:"type:varchar(50)not null"`
	Image  string  `gorm:"type:varchar(500)not null"`
	UserId int     `gorm:"type:int(11)not null"`
}

type Collect struct {
	gorm.Model
	Collect string `gorm:"type:varchar(50)"`
	userId  int    `gorm:"type:int(11)"`
	HouseId int    `gorm:"type:int(11)"`
}

type Comment struct {
	gorm.Model
	userId  int `gorm:"type:int(11)"`
	HouseId int `gorm:"type:int(11)"`
}
